<?php

namespace Oop\Ioc;

use Mockery\Matcher\Closure;

/**
 * Class Container
 * @package Oop\Ioc
 * IOC控制反转&&DI依赖注入学习
 */
class Container
{
    private $instances;
    private $binds;
    // 绑定组件
    public function bind($abstract, $concrete = null)
    {
        if ($concrete instanceof Closure)
        {
            $this->binds[$abstract] = $concrete;
        }
        else
        {
            $this->instances[$abstract] = $concrete;
        }
    }

    // 生产触发
    public function make()
    {

    }
}